<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <h2 v-for="item in letters" :key="item">{{item}}</h2>
  <button @click="onClick">按钮</button>
</div>
<script src="../vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      letters: ['a','b','c']
    },
    methods:{
      onClick:function () {
        // push方法
        this.letters.push('aaa')
      }
    }
  })
</script>
</body>
</html>
